package com.yonyou.pmclouds.inspectitem.util;

public enum InspectItemCheckResultEnum {

    CHECK_RESULT_PASS("1","合格"),
    CHECK_RESULT_NO_PASS("2","不合格"),
    CHECK_RESULT_NO_FIT("3","不适用");

    private String code;
    private String name;

    InspectItemCheckResultEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static String getName(String code) {
        for(InspectItemCheckResultEnum checkResultEnum : InspectItemCheckResultEnum.values()) {
            if(checkResultEnum.getCode().equalsIgnoreCase(code)) {
                return checkResultEnum.getName();
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}
